class CreateGroups < ActiveRecord::Migration
  def self.up
    create_table :groups do |t|
      t.column :name,                      :string
      t.column :created_at,                :datetime
      t.column :updated_at,                :datetime
      t.column :created_by,                :string
      t.column :updated_by,                :string
    end
    
    group_names = ['admin','developer','customer']
    group_names.each do |name|
      Group.create :name => name, :created_by => 'system', :updated_by => 'system'
    end    
    
  end
  
  

  def self.down
    drop_table :groups
  end
end
